package com.mo.web;



import com.mo.service.SysMenuService;
import com.mo.web.pojo.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RequestMapping("/menu/")
@RestController
public class SysMenuController {

    @Autowired
    private SysMenuService sysMenuService;



    @GetMapping("{id}")
    public JsonResult doFindById(@PathVariable Integer id){
        return new JsonResult(sysMenuService.findById(id));
    }



    @GetMapping
    public JsonResult doFindMenus(){
        return new JsonResult(sysMenuService.findMenus());
    }
}
